

<HTML>

<HEAD>

<LINK rel="stylesheet" href="../exer.css">

</HEAD>

<BODY>

<H1>

Data Structures, Algorithms, & Applications in C++<BR>

Chapter 2, Exercise 27<BR>

<BR>

</H1>



No, a program can exhibit its worst-case time behavior on one input and its

worst-case space behavior on another.

For example, we may have two ways to solve the same problem.  One may be fast

but uses a lot of space, and the other may be slow and space efficient.

We can combine these two methods into a single program in which the

solution method actually used is selected on the basis of some input

property.  Inputs that satisfy this property run fast using worst-case space;

inputs that do not satisfy this property run in worst-case time

but use minimal space.



</FONT>

</BODY>

</HTML>

